package kr.hkit.powerjava.chapter22.work2.vo;

public class Department {

	private int deptNo;
	private String deptName;
	private int floor;

	/*---------------------------생성자 3set---------------------------*/
	public Department() {
	}

	public Department(int deptNo, String deptName) {
		this.deptNo = deptNo;
		this.deptName = deptName;
	}

	public Department(int deptNo, String deptName, int floor) {
		this.deptNo = deptNo;
		this.deptName = deptName;
		this.floor = floor;
	}

	/*---------------------------설정 접근자 세트---------------------------*/
	public int getDeptNo() {
		return deptNo;
	}

	public void setDeptNo(int deptNo) {
		this.deptNo = deptNo;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public int getFloor() {
		return floor;
	}

	public void setFloor(int floor) {
		this.floor = floor;
	}

	/*---------------------------출력---------------------------*/
	@Override
	public String toString() {
		return String.format("%3s\t%4s\t%3s", deptNo, deptName, floor);
	}

	@Override
	public boolean equals(Object obj) {
		return deptNo == ((Department) obj).deptNo
				&& deptName.equals(((Department) obj).deptName);
	}

}
